/*
   Copyright (C) 2007 Yen-Ju Chen <yjchenx gmail>

   This application is free software; you can redistribute it and/or 
   modify it under the terms of the MIT license. See COPYING.

*/

#import <AppKit/AppKit.h>
#import <OrganizeKit/OrganizeKit.h>
#import "KRDataSourceProtocol.h"
#import "KRItemViewControllerProtocol.h"

/* Tag for collection menu. It allows window to find the right menu
   and hook up menu from factory. This number need to match MainMenu.nib. */
#define KRCollectionMenuItem 100

@protocol KRWindowControllerProtocol <NSObject>

+ (NSArray *) allWindowControllers;
+ (NSObject <KRWindowControllerProtocol> *) windowControllerForObject: (OKObject *) object;

- (IBAction) showWindow: (id) sender;

- (void) setDataSource: (NSObject <KRDataSourceProtocol> *) dataSource;
- (void) setRootGroup: (OKGroup *) group;
- (OKGroup *) rootGroup;

- (void) setPredicate: (NSPredicate *) predicate;
- (NSPredicate *) predicate;

- (void) setItemViewController: (NSObject <KRItemViewControllerProtocol> *) controller;

- (void) setShowingCollectionView: (BOOL) flag;
- (BOOL) isShowingCollectionView;

@end

